package com.yjs.ppjokedemo.bean;

import androidx.annotation.NonNull;
import androidx.recyclerview.widget.DiffUtil;

import java.util.Objects;

public class LikedItem {

    private RecomProduct mRecomProduct;

    public LikedItem(RecomProduct recomProduct) {
        mRecomProduct = recomProduct;
    }

    public RecomProduct getRecomProduct() {
        return mRecomProduct;
    }

    public void setRecomProduct(RecomProduct recomProduct) {
        mRecomProduct = recomProduct;
    }

    @Override
    public String toString() {
        return "LikedItem{" +
                "mRecomProduct=" + mRecomProduct +
                '}';
    }

    public static DiffUtil.ItemCallback<LikedItem> itemCallback = new DiffUtil.ItemCallback<LikedItem>() {
        @Override
        public boolean areItemsTheSame(@NonNull LikedItem oldItem, @NonNull LikedItem newItem) {
            return false;
        }

        @Override
        public boolean areContentsTheSame(@NonNull LikedItem oldItem, @NonNull LikedItem newItem) {
            return false;
        }
    };

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        LikedItem likedItem = (LikedItem) o;
        return Objects.equals(mRecomProduct, likedItem.mRecomProduct);
    }


}
